/* 全局样式设置 */
body {
  width: 100vw;
  margin: 0px;
  overflow-x: hidden;
  background-color: #f5f7fa; /* 柔和灰蓝背景 */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial,
    "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
  color: #1d2129;
}
/* 导航栏样式 */
.nav {
  width: 100vw;
  height: 64px;
  padding: 0 10%;
  box-sizing: border-box;
  border-color: #eef2f6;
  border-width: 1px 0 1px 0;
  border-style: solid;
  display: flex;
  align-items: center;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}
/* 顶部搜索框样式 */
.search-container {
  position: relative; /* 作为下拉列表的定位容器 */
  width: 100%;
  max-width: 360px;
}

.nav-search {
  width: 100%;
  height: 36px;
  padding: 0 14px 0 38px;
  border: 1px solid #e5e6eb;
  border-radius: 999px;
  background: #f7f8fa
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%2386909c" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>')
    no-repeat 12px center;
  color: #1d2129;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.nav-search::placeholder {
  color: #b6bbc3;
}
.nav-search:hover {
  background-color: #fff;
  border-color: #c9cdd4;
}
.nav-search:focus {
  background-color: #fff;
  border-color: #1e80ff;
  box-shadow: 0 0 0 3px rgba(30, 128, 255, 0.12);
}

/* 下拉列表样式 */
.list-group {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%; /* 与搜索框宽度一致 */
  background: #fff;
  border: 1px solid #e5e6eb;
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  z-index: 100;
  margin: 0;
  padding: 0;
  list-style: none;
  display: none; /* 初始隐藏 */
  box-sizing: border-box; /* 确保边框包含在宽度内 */
}

.nav-search:focus ~ .list-group,
.list-group:hover {
  display: block; /* 搜索框聚焦或列表悬停时显示 */
}

.list-group-item {
  padding: 8px 14px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.list-group-item:hover {
  background-color: #f7f8fa;
}

/* 导航链接样式 */
.nav-link {
  color: #4e5969;
  font-size: 16px;
  margin-right: 24px;
  text-decoration: none;
  padding: 6px 2px;
  transition: color 0.2s ease;
}
.nav-link:hover {
  color: #1e80ff;
}
.active {
  color: #1e80ff;
  border-bottom: 2px solid #1e80ff;
}
/* 主要内容区域样式 */
.main {
  width: 100vw;
  display: flex;
  padding: 24px 10%;
  box-sizing: border-box;
  gap: 24px;
}
.content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  width: 68%;
  min-height: 400px;
  padding-top: 8px;
  box-sizing: border-box;
}
/* 卡片组件样式 */
.card {
  display: block;
  padding: 16px 18px;
  border: 1px solid #eef2f6;
  border-radius: 12px;
  background: #fff;
  color: #1d2129;
  text-decoration: none;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card {
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}
.card-title {
  font-size: 18px;
  font-weight: 700;
  margin: 10px 0px;
}
.card-content {
  margin: 0 0 10px 0;
  font-size: 14px;
  color: #86909c;
  line-height: 24px;
}
.card-content {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-info {
  font-size: 12px;
  color: #86909c;
}
.card-fav {
  margin-right: 10px;
}
.card-commend {
  margin-right: 10px;
}
.card-author {
  margin-right: 10px;
}
.sider {
  display: block;
  min-height: 400px;
  flex-grow: 1;
  margin-left: 0;
}
/* 侧边栏样式 */
.sider {
  display: block;
  height: auto;
  flex-grow: 1;
  border-radius: 12px;
  padding: 20px 15px;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid #eef2f6;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.sider .board {
  padding-bottom: 4px;
  margin-top: 0;
  width: 100%;
}
.sider iframe {
  width: 100%;
  border: none;
  overflow: hidden;
  padding: 0;
  margin: 20px 0 12px 0;
  border-radius: 8px;
  background: #f7f8fa;
  height: 200px;
}
.sider .board .button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  border: none;
  padding: 12px 15px;
  margin-bottom: 12px;
  border-radius: 8px;
  background-color: #f7f8fa;
  color: #4e5969;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}
.sider .board .button:hover {
  transform: translateX(4px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}
.sider .board button:nth-child(1) {
  background-color: rgba(30, 128, 255, 0.08);
  color: #1e80ff;
}
.sider .board button:nth-child(2) {
  background-color: rgba(17, 174, 248, 0.08);
  color: #11aef8;
}
.sider .board button:nth-child(3) {
  background-color: rgba(97, 218, 84, 0.1);
  color: #61d45e;
}
.sider .board button:nth-child(4) {
  background-color: rgba(142, 36, 170, 0.08);
  color: #8e24aa;
}
.sider .board a {
  text-decoration: none;
  color: inherit;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sider .board a i {
  font-size: 18px;
}
.sider .board1 {
  height: calc(100% - 180px);
  width: 100%;
  opacity: 0.9;
}
